package git.soulbgm.service;

import git.soulbgm.pojo.GoodsDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 商品服务
 *
 * @author SoulBGM
 * @date 2020/11/10
 */
@FeignClient(name = "nacos-seata-nacos-goods")
public interface GoodsServiceFeignClient {

    /**
     * 减少库存
     *
     * @param dto dto
     * @return {@link Boolean}
     */
    @PostMapping("/goods/reduceInventory")
    Boolean reduceInventory(@RequestBody GoodsDto dto);

}
